import React from 'react';

import DBTable from 'components/DBTable';
import Logger from '../../../utils/Logger';

import ModuleInnerTable from './ModuleInnerTable.js';

import {
  Form,
  Input,
  Row,
  Col,
  Button,
  DatePicker,
  Select,
  Icon,
  Radio,
  InputNumber,
  Checkbox,
  message,
  Upload,
  notification
} from 'antd';

const logger = Logger.getLogger('TreeDbTableView');
/**
 * 操作数据库中的一张表的组件, 又可以分为3个组件: 表单+表格+分页器
 */
class TreeDbTableView extends DBTable {

  // 代替componentWillMount
  constructor(props) {
    super(props);
  }

  onBeforeRefresh = (result) => {
    for (let i = 0; i < result.data.list.length; i++) {
      delete result.data.list[i].children;
    }
  }
  createInnerTable() {
    return ModuleInnerTable;
  }

}

export default TreeDbTableView;
